package action;

import java.util.List;

import org.apache.struts2.ServletActionContext;
import org.springframework.web.struts.ActionSupport;

import biz.INewstypesBiz;

import entity.Newstypes;

public class NewstypesAction extends ActionSupport {

	private Newstypes newstypes;
	private INewstypesBiz biz;

	public Newstypes getNewstypes() {
		return newstypes;
	}

	public void setNewstypes(Newstypes newstypes) {
		this.newstypes = newstypes;
	}

	public INewstypesBiz getBiz() {
		return biz;
	}

	public void setBiz(INewstypesBiz biz) {
		this.biz = biz;
	}
	
	public String findNewsTypeList(){
		int tid=Integer.parseInt(ServletActionContext.getRequest().getParameter("tid"));
		List<Newstypes> list=biz.findByProperty("tid", tid);
		ServletActionContext.getRequest().getSession().setAttribute("ntList",list);
		return "toNewsAC";
	}
}
